import com.yang.config.ConfigApp;
import com.yang.scanBean.X;
import com.yang.scanBean.Y;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description: 主测试类
 * @author: Yang Qiang
 * @create: 2021-10-18 21:24
 */
public class TestYang {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext
				= new AnnotationConfigApplicationContext(ConfigApp.class);

		Y y = (Y) applicationContext.getBean("y");
		X x = y.getX();
		System.out.println(y);
		System.out.println(x);



//		Bean1 bean1 = (Bean1) applicationContext.getBean("bean1");
//		bean1.test();

//		UserServiceImpl bean = applicationContext.getBean(UserServiceImpl.class);
//		bean.findAll();

	}
}
